Move codegen api to separate package#201
Move codegen api to separate package#201adamdicarlo0 wants to merge 33 commits intowolfadex:mainfrom
Conversation
codegen/elm.codegen.json
Outdated
| "elm-community/json-extra": "4.3.0", | ||
| "elm/url": "1.0.0", | ||
| "dillonkearns/elm-pages": "10.1.0", | ||
| "dillonkearns/elm-pages": "10.2.2", |
There was a problem hiding this comment.
This and similar upgrades were necessary for the example-using-api project to be able to compile.
|
TODO:
|
78c0ac4 to
e80b96a
Compare
| pkgs.elmPackages.elm-review | ||
| pkgs.nodejs-18_x | ||
| pkgs.nodejs_20 |
There was a problem hiding this comment.
Upgraded this to match the node version used in CI.
Now CI is using the Nix shell, so this dictates the Node version everywhere.
| ] | ||
| } | ||
| } No newline at end of file | ||
| } |
There was a problem hiding this comment.
NB: This file moved to the elm-open-api-codegen/ folder
| @@ -0,0 +1,906 @@ | |||
| module OpenApi.BackendTask exposing (withConfig) | |||
There was a problem hiding this comment.
This code comes from the old Cli module.
|
|
||
| Cli.Validate.Invalid _ -> | ||
| False | ||
| regexToCheckIfJson mediaType |
There was a problem hiding this comment.
Changed these functions to not need the Cli module, since this is now in an Elm package.
| "elm-explorations/test": "2.2.0", | ||
| "miniBill/elm-unicode": "1.1.1" | ||
| }, | ||
| "direct": {}, |
There was a problem hiding this comment.
Test suite has moved into the package (elm-open-api-codegen) subfolder
| }, | ||
| "defaultStatus": ["⏳", "S"] | ||
| } | ||
| ] |
There was a problem hiding this comment.
this run-pty config is for npm run review:watch
| "wolfadex/elm-ansi": "3.0.0", | ||
| "wolfadex/elm-open-api": "2.0.0" | ||
| "elmcraft/core-extra": "2.2.0", | ||
| "wolfadex/elm-open-api-codegen": "1.0.0", |
There was a problem hiding this comment.
This package is not published yet, so this elm.json file cannot work as-is. The TEMP HACK blocks in the CI workflow work around this (with the same method I used to work around it locally).
|
Superceded by #214 |
Sorry... it's a huge PR! But most of the diff is
Genmodules (so, so many)It includes some new scripts, which must be used to test things locally until the new package is published.
After cloning, this series of commands should (in theory) just work:
Slightly tangential changes:
shell.nix, rather than installing duplicates vianpm, to remove the need to keep them in sync (I probably wouldn't have tried it if I'd realized how much work CI would be, lol)shell.nixin CI, as well (this requires quite a bit of boilerplate to make caching work, without using something like devbox directly)test,review,formatbecause the project structure has changed so muchcc @miniBill